package gui;

import java.awt.Color;
import java.awt.Rectangle;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.Dimension;
import java.lang.reflect.Array;

import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.JComboBox;

public class SubscriptionFilde extends JFrame{
	private JPanel mainform = null;
	private MainPanel SF;
	private JLabel jLabelWelcome = null;
	private JLabel jLabel = null;
	private JComboBox jComboBoxtype = null;
    static  public String[] subscriptionop={"monthly","yearly"};
    static  public String[] PayingMethod={"Credit Card","Cash"};
	private JLabel jLabelPayingMethod = null;
	private JComboBox jComboBoxPayingMethod = null;
	private JButton jButtonNext = null;
	private JButton jButtonBack = null;
 

	public SubscriptionFilde() {
		super();
		initialize();
	}

	/**
	 * 
	 */
	private void initialize() {
		this.setSize(1000, 720);
		this.setContentPane(SubscriptionFildeForm());
		this.setTitle("MAIN SCREEN");	
		
		
	}
	private JPanel SubscriptionFildeForm() {
		if (mainform == null) {
			jLabelPayingMethod = new JLabel();
			jLabelPayingMethod.setBounds(new Rectangle(33, 318, 193, 37));
			jLabelPayingMethod.setText("Choose Paying Method");
			jLabel = new JLabel();
			jLabel.setBounds(new Rectangle(33, 229, 193, 37));
			jLabel.setText("choose subscription type");
			jLabelWelcome = new JLabel();
			jLabelWelcome.setBounds(new Rectangle(165, 29, 556, 138));
			jLabelWelcome.setText("NEW SUBSCRIPTION");
			mainform = new JPanel();
			mainform.setLayout(null);
			mainform.setBackground(Color.CYAN); 
			mainform.add(jLabelWelcome, null);
			mainform.add(jLabel, null);
			mainform.add(getJComboBoxtype(), null);
			mainform.add(jLabelPayingMethod, null);
			mainform.add(getJComboBoxPayingMethod(), null);
			mainform.add(getJButtonNext(), null);
			mainform.add(getJButtonBack(), null);
			 


		}
		return mainform; 
	}

	/**
	 * This method initializes jComboBoxtype	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxtype() {
		
		
		if (jComboBoxtype == null) {
			jComboBoxtype = new JComboBox();
			jComboBoxtype.setBounds(new Rectangle(286, 232, 200, 29));
			jComboBoxtype.addItem(subscriptionop[0]);
			jComboBoxtype.addItem(subscriptionop[1]);
			
			}
		return jComboBoxtype;
	}

	/**
	 * This method initializes jComboBoxPayingMethod	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxPayingMethod() {
		if (jComboBoxPayingMethod == null) {
			jComboBoxPayingMethod = new JComboBox();
			jComboBoxPayingMethod.setBounds(new Rectangle(286, 320, 200, 29));
			jComboBoxPayingMethod.addItem(PayingMethod[0]);
			jComboBoxPayingMethod.addItem(PayingMethod[1]);
		}
		return jComboBoxPayingMethod;
	}

	/**
	 * This method initializes jButtonNext	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonNext() {
		if (jButtonNext == null) {
			jButtonNext = new JButton();
			jButtonNext.setBounds(new Rectangle(442, 409, 207, 65));
			jButtonNext.setText("NEXT");
			jButtonNext.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
				}
			});
		}
		return jButtonNext;
	}

	/**
	 * This method initializes jButtonBack	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonBack() {
		if (jButtonBack == null) {
			jButtonBack = new JButton();
			jButtonBack.setBounds(new Rectangle(150, 409, 207, 65));
			jButtonBack.setText("BACK");
			jButtonBack.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					NewSubCreat Subcrea = new NewSubCreat();
					Subcrea.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
					Subcrea.setSize( 1000,720 ); // set frame size
					Subcrea.setResizable(true);
					Subcrea.setVisible( true ); // display frame
					SubscriptionFilde.this.dispose();
				}
			});
		}
		return jButtonBack;
	}
	
}  //  @jve:decl-index=0:visual-constraint="26,28"
